import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import './handlers/detail_handler.dart';

class Routes {
  static String root = '/';
  static String detail = '/detail';

  static void configureRoutes(Router router) {
    // 处理没有匹配到路由时候的情况
    router.notFoundHandler = Handler(
        handlerFunc: (BuildContext context, Map<String, List<String>> params) {
      print('路由匹配不正确,请检查');
    });

    router.define(detail, handler: detailHander);
  }
}
